//
//  AppDelegate.m
//  Stream
//
//  Created by shaw on 16/7/20.
//  Copyright © 2016年 showshaw. All rights reserved.
//

#import "AppDelegate.h"

#import "BaseNavigationController.h"
#import "SlideNavigationController.h"
#import "LeftMenuViewController.h"
#import "LoginViewController.h"
#import "MainViewController.h"
#import "IQKeyboardManager.h"
@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];

    MainViewController * main = [[MainViewController alloc] init];
    SlideNavigationController * slideNavi = [[SlideNavigationController alloc] initWithRootViewController:main];;
    
    LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init];
    slideNavi.leftMenu = leftMenu;
    leftMenu.delegate = main;
    
    self.window.rootViewController = slideNavi;
    [self.window makeKeyAndVisible];
    
    //设置键盘
    IQKeyboardManager *manager = [IQKeyboardManager sharedManager];
    manager.enable = YES;
    manager.shouldResignOnTouchOutside = YES;
    manager.shouldToolbarUsesTextFieldTintColor = YES;
    manager.enableAutoToolbar = YES;
    
    return YES;
}


@end
